home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 34 / 034.d81 / inter melody (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  80 lines

  1. 5 poke53280,11:poke53281,.
  2. 10 if(peek(679)<>206)thenload"inter melody.ml1",8,1
  3. 15 if(peek(36818)<>120)thenload"inter melody.ml2",8,1
  4. 16 gosub9000:clr:goto110
  5. 20 poke198,.
  6. 23 geta$:ifa$=""then23
  7. 25 return
  8. 110 poke55,208:poke56,143:clr
  9. 120 dimnt$(12),fr(12):s=54272:base=36864:t=1:forl=stos+24:pokel,0:next
  10. 125 print"[147]              [158][201]nter [205]elody"
  11. 126 print"[129]                  by"
  12. 127 print"            [200][197][206][210][201][203] [205][193][210][203][193][210][201][193][206]"
  13. 128 print"[154]            [208]ress [209] [154]to [209]uit."
  14. 130 print"[158][197]nter two voice numbers. [1-3]":print"->[153]     [157][157][157][157][157]";
  15. 132 gosub20:if(a$<"1")or(a$>"3")and(a$<>"q")and(a$<>"[209]")then132
  16. 133 ifa$="q"ora$="[209]"thengosub50000:goto130
  17. 134 a=val(a$):printa$" ->[153]";
  18. 135 gosub20:ifa$="q"ora$="[209]"thengosub50000:goto130
  19. 136 if(a$<"1")or(a$>"3")or(val(a$)=a)then135
  20. 138 b=val(a$):printa$
  21. 139 a=(a-1)*7:b=(b-1)*7
  22. 140 ad(1)=0:sr(1)=240:ad(2)=9:sr(2)=0:ph(1)=0:pl(1)=0:ph(2)=0:pl(2)=0
  23. 150 wa=16:wb=32:tempo=15:rem waveform (16,32,64,128) & beat (60th of sec)
  24. 167 print"[147]            [208]rocessing [206]otes"
  25. 170 fori=1to12:readnt$(i),fr(i):next
  26. 180 c=0:oc=4:rem start at 4th octave
  27. 190 readc$:ifc$="end"then310
  28. 200 ifc$="res"thenhf%=0:lf%=0:goto280
  29. 210 ifc$="+"thenoc=oc+1:goto190
  30. 220 ifc$="-"thenoc=oc-1:goto190
  31. 230 ifval(c$)>0then290
  32. 240 fori=1to12
  33. 250 ifc$=nt$(i)thenf=fr(i):i=12
  34. 260 next:f=f/(2^(7-oc))
  35. 270 hf%=f/256:lf%=f-256*hf%
  36. 280 pokebase+c,hf%:c=c+1:pokebase+c,lf%:c=c+1:print"-";:goto190
  37. 290 fori=1toval(c$)-1
  38. 300 pokebase+c,hf%:c=c+1:pokebase+c,lf%:c=c+1:print"-";:next:goto190
  39. 310 h(t)=c:t=t+1:pokebase+c,255:print
  40. 320 if(base+c)>=(base+2048)thenprint"error:[146] out of memory":end
  41. 330 ift=2thenbase=base+2048:goto180
  42. 340 ifh(1)<>h(2)thenprint"error:[146] number of notes do not match":end
  43. 350 poke704,a:poke709,b:poke762,tempo
  44. 360 poke692,a+4:poke753,a+4:poke688,wa:poke749,wa+1:rem set waveform a
  45. 370 poke695,b+4:poke756,b+4:poke690,wb:poke751,wb+1:rem set waveform b
  46. 380 pokes+a+5,ad(1):pokes+a+6,sr(1):pokes+b+5,ad(2):pokes+b+6,sr(2)
  47. 390 pokes+a+2,pl(1):pokes+a+3,ph(1):pokes+b+2,pl(2):pokes+b+3,ph(2)
  48. 400 print"[147][197]nter:  [158]sys36818   to turn music"
  49. 410 print"on and off.":end
  50. 500 end
  51. 1005 data c,34334,c#,36376, d,38539
  52. 1010 data d#,40830, e,43258, f,45830
  53. 1020 data f#,48556,g,51443,g#,54502
  54. 1030 data a,57743,a#,61176, b,64814
  55. 2000 rem  put notes here for voice 1
  56. 2010 data a,b,c,d,e,f,g,f,e,d,c,b,a
  57. 4999 data end
  58. 5000 rem  put notes here for voice 2
  59. 5010 data g,f,e,d,c,b,a,b,c,d,e,f,g
  60. 7999 data end
  61. 9000 print"[147][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  62. 9010 fora=1to23:print"[221]"spc(38)"[221]";:next
  63. 9020 print"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][157][148][192]"
  64. 9030 print"[159]          [204][207][193][196][211][212][193][210] [208]resents:"
  65. 9040 print"[158]            [201]nter [205]elody"
  66. 9050 print"         by [200]enrik [205]arkarian"
  67. 9055 print"          ([195])opyright 1987"
  68. 9060 print"[159]       [208]ress [211][208][193][195][197] to continue.":poke198,.
  69. 9070 geta$:ifa$<>" "then9070
  70. 9080 return
  71. 40000 :
  72. 40001 :
  73. 50000 print:print"[154] [193]re you sure you want to quit?  ([217][154]/[206][154])"
  74. 50010 gosub20:ifa$<>"y"anda$<>"n"anda$<>"[217]"anda$<>"[206]"then50010
  75. 50015 ifa$="[206]"thena$="n"
  76. 50020 ifa$="n"thenprint"[145]                                       [145][145][145][145][145]":return
  77. 50030 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  78. 50040 print"[147]";:ifer<>63thenend
  79. 50050 load"hello connect",8
  80.